<?php
	require_once 'classes/Config.class.php';
	$Config = new Config();

	if ($argc < 2) {
		echo 'Specify a feed type.', "\n";
		exit;
	}
	
	if (!in_array($argv[1], array('news', 'ftse'))) {
		echo 'Invalid feed type.', "\n";
		exit;
	} else {
		define('FEED', (($argv[1] === 'news') ? NEWS_FEED : FTSE_FEED));
	}
	
	$fType = ucfirst(strtolower($argv[1]));

	require_once 'classes/Database.class.php';
	require_once 'classes/FeedReader.class.php';
	
	$FeedReader = new FeedReader($fType);
?>